const toThousands = function (num) {
  if (num > 99999) {
    return (num / 10000).toFixed(1) + '万'
  } else {
    return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
  }
}

export default toThousands
